<?php
/*
 * Page Name: Send Contact Us page
 * Author: Avik Kundu
 * Created On : 16th August,2011
 * Modified On :
 * 
 */
include_once 'submitemail.php';
//error_reporting(1);

$actionSelected = $_REQUEST['action'];
$firstName = $_REQUEST['fname'];
$lastName = $_REQUEST['lname'];
$phoneNumber = $_REQUEST['phone'];
$emailId = $_REQUEST['email'];
$comments = $_REQUEST['comments'];
$country = $_REQUEST['country'];
$state = $_REQUEST['state'];
$timefrom = $_REQUEST['timefrom'];
$timeto = $_REQUEST['timeto'];

$mailTo = "email@vfix.biz";

$fromEmail = $emailId;
$fromName = $firstName." ".$lastName;
$subject = "$fromName tried to contact through vFix";
$message = "";


	if(strlen($firstName)>0)
	{
		$message .="";
		$message .="First Name :$firstName\n";
	}
	if(strlen($lastName)>0)
	{
		$message .="";
		$message .="Last Name : $lastName\n";
	}
	if(strlen($phoneNumber)>0)
	{
		$message .="";
		$message .="Phone Number : $phoneNumber\n";
	}
	if(strlen($emailId)>0)
	{
		$message .="";
		$message .="Email Address :$emailId\n";
	}
	if(strlen($country)>0)
	{
		$message .="";
		$message .="Country : $country\n";
	}
	if(strlen($state)>0)
	{
		$message .="";
		$message .="Country : $state\n";
	}
	if(strlen($timefrom)>0)
	{
		$message .="";
		$message .="Call Time From : $timefrom\n";
	}
	if(strlen($timeto)>0)
	{
		$message .="";
		$message .="Call Time From : $timeto\n";
	}
	if(strlen($comments)>0)
	{
		$message .="";
		$message .="Comments :$comments\n";
	}
	file_put_contents("C:\\message.txt",$message);

	GENERATE_SMTP_MAIL($mailTo,$fromEmail,$fromName,'','',$subject,$message);
	echo 1;
	
	?>
	
